package com.cloxtec.scada.service;

import lombok.extern.slf4j.Slf4j;
import org.quartz.*;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Date;


@Slf4j
@Component
public class TaskTimedCalculate extends QuartzJobBean {

    @Resource
    private RealTimeData realTimeData;

    @Resource
    private MqttMsgHandler mqttMsgHandler;

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        String taskId = context.getJobDetail().getJobDataMap().getString("taskId");
        log.info(new Date() + "————开始执行定时任务，id：" + taskId);
        if (taskId.equals("task_save_iot_data")) {

        } else if (taskId.equals("task_del_history_data")) {

        } else {

        }
    }
}
